<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title th:replace="${title}">后台博客页面</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" th:href="@{~/../static/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{~/../static/bower_components/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{~/../static/bower_components/Ionicons/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{~/../static/dist/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" th:href="@{~/../static/dist/css/skins/_all-skins.min.css}">
    <link rel="shortcut icon" th:href="@{~/../static/img/favicon.ico}" type="image/x-icon" />
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">

</head>

<!--在使用时，记得先使用<body>标签，否则没有主题样式-->
<body class="hold-transition skin-blue sidebar-mini">
<nav th:fragment="left-menu">
    <!--<head>-->
    <header class="main-header">
        <!-- Logo -->
        <a href="../index.html" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>blog</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>个人中心</b>-weblog</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- Messages: style can be found in dropdown.less-->
                    <li class="dropdown messages-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-envelope-o"></i>
                            <!--<span class="label label-success">4</span>-->
                        </a>
                        <ul class="dropdown-menu">
                            <!--动态获取消息数量-->
                            <li class="header">You have 4 messages</li>
                            <li>
                                <!-- inner menu: contains the actual data -->
                                <ul class="menu">
                                    <li><!-- start message -->
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src="../../static/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                                            </div>
                                            <!--利用each进行遍历-->
                                            <h4>
                                                Support Team
                                                <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                    <!-- end message -->
                                </ul>
                            </li>
                            <li class="footer"><a href="#">See All Messages</a></li>
                        </ul>
                    </li>
                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="../../static/img/default-head.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs" th:text="${session.user.username}">User</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                            <img src="../../static/img/default-head.jpg" class="img-circle" alt="User Image">

                            <p>
                            <div th:text="${session.user.userId}+'-'+${session.user.username}"></div>
                            <small th:text="${session.user.joinDate}">Member since Nov. 2012</small>
                            </p>
                        </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Catagory</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Write</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Collection</a>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">Profile</a>
                                </div>
                                <div class="pull-right">
                                    <a th:href="@{~/user/logout}" class="btn btn-default btn-flat">Sign out</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button
                    <li>
                      <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>-->
                </ul>
            </div>
        </nav>
    </header>

    <!-- =============================================== -->

    <!-- Left side column. contains the sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <!--th:src="@{~/${session.user.avatar}}"-->
                    <img src="../../static/img/default-head.jpg" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p th:text="${session.user.username}">User</p>

                    <!--根据用户的状态user.status来进行判断-->
                    <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">后台管理页面</li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-user"></i>
                        <span>个人中心</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li id="personal"><a th:href="@{/user/personal}"><i class="fa fa-circle-o"></i> 我的信息</a></li>
                        <li id="changePass"><a th:href="@{/user/changePass}"><i class="fa fa-circle-o"></i> 修改密码</a></li>
                        <!--<li><a href="../../static/index.html"><i class="fa fa-circle-o"></i> 数据分析</a></li>-->
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-newspaper-o"></i>
                        <span>我的博客</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <!--博客按照发布时间排序展示/或者按照更新时间排序-->
                        <li id="myblog"><a th:href="@{/passage/findByUserId}"><i class="fa fa-circle-o"></i> 我的博客</a></li>
                        <li id="blog-write"><a th:href="@{/passage/write}"><i class="fa fa-circle-o"></i> 写博客</a></li>
                        <li id="blogDraft"><a th:href="@{/passage/findDraft}"><i class="fa fa-circle-o"></i> 草稿箱</a></li>
                        <li id="blogDelete"><a th:href="@{/passage/findDelete}"><i class="fa fa-circle-o"></i> 回收站</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-navicon"></i>
                        <span>分类专栏</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li id="catagory"><a th:href="@{/catagory/findByUser}"><i class="fa fa-circle-o"></i> 我的分类</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-star"></i>
                        <span>我的收藏</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li id="collect"><a th:href="@{/catagory/findCollect}" ><i class="fa fa-circle-o"></i> 收藏分类</a></li>
                        <li id="collect-passage"><a th:href="@{/passage/findCollectPassage}"><i class="fa fa-circle-o"></i> 收藏文章</a></li>
                    </ul>
                </li>

            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>
</nav>

<footer th:fragment="footer"  class="main-footer">
    <div class="pull-right hidden-xs">
        <b>Student</b> 201810214719
    </div>
    <strong th:text="${session.user.username}">
        <!--到时候将这个链接跳转到博客主页/templates/index.html-->
        <a href="https://adminlte.io">个人博客</a>
    </strong>
</footer>

<!--使用thymeaf可以引入资源-->
<th:block th:fragment="script">
    <!-- jQuery 3 -->
    <script th:src="@{~/../static/bower_components/jquery/dist/jquery.min.js}"></script>
    <!-- Bootstrap 3.3.7 -->
    <script th:src="@{~/../static/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
    <!-- SlimScroll -->
    <script th:src="@{~/../static/bower_components/jquery-slimscroll/jquery.slimscroll.min.js}"></script>
    <!-- FastClick -->
    <script th:src="@{~/../static/bower_components/fastclick/lib/fastclick.js}"></script>
    <!-- AdminLTE App -->
    <script th:src="@{~/../static/dist/js/adminlte.min.js}"></script>
    <!-- AdminLTE for demo purposes -->
    <script th:src="@{~/../static/dist/js/demo.js}"></script>
</th:block>

</body>

</html>